﻿using ProjectFootball.MVC.Foundation;
using ProjectFootball.MVC.Foundation.ResourceLibrary;
using System;
using System.ComponentModel.DataAnnotations;

namespace ProjectFootball.MVC.Areas.TeamArea.Models
{
    public class TeamDataModel : BaseDataModel
    {
        public TeamDataModel()
        {
            ActiveFrom = DateTime.Today;
            ActiveTo = _DateTime.HighDate;
        }

        public Guid TeamVersionGuid { get; set; }
        public Guid ApprovalGuid { get; set; }
        public Guid TeamGuid { get; set; }

        [Required]
        [StringLength(50, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 2)]
        [Display(Name = "Team name")]
        public string TeamName { get; set; }

        [UIHint("DropDown/Country")]
        [Required]
        [Display(Name = "Country")]
        public Guid CountryGuid { get; set; }

        [UIHint("DropDown/Venue")]
        [Display(Name = "Home venue")]
        public Guid? VenueGuid { get; set; }

        [Required]
        [Display(Name = "Active from")]
        [DataType(DataType.Date)]
        public DateTime ActiveFrom { get; set; }

        [Required]
        [Display(Name = "Active to")]
        [DataType(DataType.Date)]
        public DateTime ActiveTo { get; set; }
    }
}